<?php

use think\facade\Route;

Route::group(
    'line',
    function () {
        Route::post('list', 'line/lists');
        Route::post('save', 'line/save');
        Route::post('del', 'line/del');
        Route::post('check_name_exists', 'line/checkNameExists');
        Route::post('user_usable_list', 'line/userUsableList');
        Route::post('user_discount_list', 'line/userDiscountList');
        Route::post('bind_discount', 'line/bindDiscount');
        Route::post('unbind_discount', 'line/unbindDiscount');
    }
);

Route::group(
    'user',
    function () {
        Route::post('list', 'user/lists');
        Route::post('save', 'user/save');
        Route::post('del', 'user/del');
        Route::post('check_name_exists', 'user/checkNameExists');
        Route::post('login', 'user/login');
        Route::group(
            '',
            function () {
                Route::post('info', 'user/info');
                Route::post('discount', 'user/discount');
            }
        )->middleware(app\middleware\Auth::class);
    }
);

